<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="../../../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../../layuiadmin/style/admin.css" media="all">
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-tab layui-tab-brief table_tab" lay-filter="goods_table_tab">
            <ul class="layui-tab-title background_white">
                <li class="layui-this" lay-id="">全部商品</li>
                <li lay-id="1">已上架商品</li>
                <li lay-id="0">未上架商品</li>
            </ul>
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-body">
                        <div class="layui-form search_from" lay-filter="search_from">
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <label class="layui-form-label">商品ID</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="id" placeholder="请输入" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">商品名称</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="title" placeholder="请输入" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">分类</label>
                                    <div class="layui-input-inline">
                                        <script type="text/html" template lay-url="{{ layui.setter.apiHost }}/goods/category/select_all" lay-done="layui.form.render();">
                                            <select name="category_id" lay-search="">
                                                <option value=""></option>
                                                {{# layui.each(d.data, function(index, item){ }}
                                                <option value="{{ item.id }}" {{# if(item.children){ }}disabled{{# } }}{{# if(item.id== d.params.category_id){ }}selected{{# } }}>{{ item.title }}</option>
                                                {{# if(item.children){ }}
                                                {{# layui.each(item.children, function(index1, item1){ }}
                                                <option value="{{ item1.id }}" {{# if(item1.children){ }}disabled{{# } }}{{# if(item1.id== d.params.category_id){ }}selected{{# } }}>|--{{ item1.title }}</option>
                                                {{# if(item1.children){ }}
                                                {{# layui.each(item1.children, function(index2, item2){ }}
                                                <option value="{{ item2.id }}" {{# if(item2.id== d.params.category_id){ }}selected{{# } }}>|--|--{{ item2.title }}</option>
                                                {{# }); }}
                                                {{# } }}
                                                {{# }); }}
                                                {{# } }}
                                                {{# }); }}
                                            </select>
                                        </script>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <button class="layui-btn layui-btn-sm" lay-filter="search_button" lay-submit>搜索</button>
                                </div>
                                <div class="layui-inline layui-font-12 search_more_button">
                                    更多搜索条件<i class="sm_iconfont icon-xiangxia"></i>
                                </div>
                            </div>
                            <div class="layui-form-item layui-hide">
                                <div class="layui-inline">
                                    <label class="layui-form-label">品牌</label>
                                    <div class="layui-input-inline">
                                        <script type="text/html" template lay-url="{{ layui.setter.apiHost }}/system/brand/select" lay-done="layui.form.render();">
                                            <select name="brand_id" lay-search="">
                                                <option value=""></option>
                                                {{# layui.each(d.data, function(index, item){ }}
                                                <option value="{{ item.id }}">{{ item.title }}</option>
                                                {{# }); }}
                                            </select>
                                        </script>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">商品类型</label>
                                    <div class="layui-input-inline">
                                        <script type="text/html" template lay-url="{{ layui.setter.apiHost }}/goods/goods/type" lay-done="layui.form.render();">
                                            <select name="type">
                                                <option value=""></option>
                                                {{# layui.each(d.data, function(index, item){ }}
                                                <option value="{{ index }}">{{ item }}</option>
                                                {{# }); }}
                                            </select>
                                        </script>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">审核状态</label>
                                    <div class="layui-input-inline">
                                        <select name="status">
                                            <option value=""></option>
                                            <option value="0">锁定</option>
                                            <option value="1">审核</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">是否推荐</label>
                                    <div class="layui-input-inline">
                                        <select name="is_rem">
                                            <option value=""></option>
                                            <option value="0">否</option>
                                            <option value="1">是</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">商家分类</label>
                                    <div class="layui-input-inline">
                                        <script type="text/html" template lay-url="{{ layui.setter.apiHost }}/seller/category/select_all" lay-done="layui.form.render();">
                                            <select name="category_id" lay-search="">
                                                <option value=""></option>
                                                {{# layui.each(d.data, function(index, item){ }}
                                                <option value="{{ item.id }}" {{# if(item.children){ }}disabled{{# } }}{{# if(item.id== d.params.category_id){ }}selected{{# } }}>{{ item.title }}</option>
                                                {{# if(item.children){ }}
                                                {{# layui.each(item.children, function(index1, item1){ }}
                                                <option value="{{ item1.id }}" {{# if(item1.children){ }}disabled{{# } }}{{# if(item1.id== d.params.category_id){ }}selected{{# } }}>|--{{ item1.title }}</option>
                                                {{# if(item1.children){ }}
                                                {{# layui.each(item1.children, function(index2, item2){ }}
                                                <option value="{{ item2.id }}" {{# if(item2.id== d.params.category_id){ }}selected{{# } }}>|--|--{{ item2.title }}</option>
                                                {{# }); }}
                                                {{# } }}
                                                {{# }); }}
                                                {{# } }}
                                                {{# }); }}
                                            </select>
                                        </script>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <table class="layui-hide" id="table_list" lay-filter="table_list"></table>

                        <script type="text/html" id="toolbar">
                            <div class="layui-btn-container">
                                <button class="layui-btn layui-btn-sm layui-hide" lay-event="add">添加</button>
                                <button class="layui-btn layui-btn-sm layui-hide" lay-event="status_on">审核</button>
                                <button class="layui-btn layui-btn-sm layui-hide" lay-event="status_off">锁定</button>
                                <button class="layui-btn layui-btn-sm layui-hide" lay-event="shelves_status_on">上架</button>
                                <button class="layui-btn layui-btn-sm layui-hide" lay-event="shelves_status_off">下架</button>
                                <button class="layui-btn layui-btn-sm layui-btn-danger layui-hide" lay-event="delete">删除</button>
                                <button class="layui-btn layui-btn-sm layui-btn-normal layui-hide" lay-event="recycle">回收站</button>
                            </div>
                        </script>
                        <script type="text/html" id="action_button">
                            <a class="layui-btn layui-btn-xs layui-hide" lay-event="edit">编辑</a>
                            <a class="layui-btn layui-btn-danger layui-btn-xs layui-hide" lay-event="delete">删除</a>
                            <a class="layui-btn layui-btn-normal layui-btn-xs layui-hide" lay-event="qrcode">小程序码</a>
                        </script>
                        <script type="text/html" id="img_tmp">
                            {{# if(d.image != ''){ }}
                            <a href="{{ d.image }}" target="_blank">
                                <img src="{{ layui.common.image_resize(d.image, 80, 80) }}"></a>
                            {{# } }}
                        </script>
                        <script type="text/html" id="title_tmp">
                            {{ d.title }}
                            {{# if(d.is_rem == 1){ }}
                            <span class="layui-badge">推荐</span>
                            {{# } }}
                            <br><span class="layui-font-gray">id：{{ d.id }}</span>
                        </script>
                        <script type="text/html" id="shelves_status_tmp">
                            {{# if(d.shelves_status == 1){ }}
                            <span class="layui-badge layui-bg-green">上架</span>
                            {{# } else { }}
                            <span class="layui-badge">下架</span>
                            {{# } }}
                        </script>
                        <script type="text/html" id="status_tmp">
                            <input type="checkbox" value="{{d.id}}" lay-skin="switch" lay-text="正常|锁定" lay-filter="status_btn" {{# if(d.status== 1){ }}checked{{# } }}>
                        </script>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script src="../../../../layuiadmin/layui/layui.js"></script>
<script>
    layui.config({
        base: '../../../../layuiadmin/',//静态资源所在路径
        version: true
    }).extend({
        index: 'modules/seller/index',//主入口模块
        goods: 'seller/goods',
        goods_sku: 'seller/goods_sku',
        goods_detail: 'seller/goods_detail',
    }).use(['index', 'goods'], function () {

    });
</script>
</body>
</html>
